﻿using System.Collections.Generic;
using Headsight.BPMN2WF.BPMN.Model;
using Rhino.Mocks;

namespace Headsight.BPMN2WF.Testing.TestObjCtors
{
    /// <summary>
    /// <see cref="BPMNSequenceFlowFactory"/> <see cref="ITestObjCtor{T}"/>.
    /// </summary>
    public class BPMNModelFactoryBPMNSequenceFlowCtor : ITestObjCtor<BPMNSequenceFlowFactory>
    {
        private IList<BPMNSequenceFlow> _bpmnSeqFlows;

        public BPMNSequenceFlowFactory Create()
        {
            var result = MockRepository.GenerateStub<BPMNSequenceFlowFactory>();

            result.Expect(x => x.CreateBPMNSequenceFlows(null, null)).IgnoreArguments().Return(_bpmnSeqFlows);

            return result;
        }

        public BPMNModelFactoryBPMNSequenceFlowCtor With(IList<BPMNSequenceFlow> bpmnSeqFlows)
        {
            _bpmnSeqFlows = bpmnSeqFlows;

            return this;
        }
    }
}